from urllib import request, parse
from urllib.parse import urlencode

url = 'http://httpbin.org/post'
headers = {
    'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
    'Host': 'httpbin.org'
}
dict = {
    'name': 'Germey'
}
data = bytes(parse.urlencode(dict), encoding='utf8')
req = request.Request(url, data=data, headers=headers, method='POST')
response = request.urlopen(req)
print(response.read().decode('utf-8'))

jy_url = 'http://119.3.200.75:8047/brain/communication/knowledge/list?'
param = {
    'keyword': '小柴胡'
}
jy_url = jy_url + urlencode(param)
print(jy_url)
param_data = bytes(parse.urlencode(param), encoding='utf8')
jy_req = request.Request(jy_url, method='GET')
response = request.urlopen(jy_req)
print(response.read().decode('utf-8'))
